package com.zhonghui.modlules.user.eshopDomain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

import java.math.BigDecimal;
import java.util.Date;

@TableName("user_recharge")
public class UserRecharge extends BaseDomain {
    @TableId
    private Long id;
    private Long uid;
    private String orderId;
    private BigDecimal price;
    private BigDecimal givePrice;
    private String rechargeType;
    private Integer paid;
    private Date payTime;
    private BigDecimal refundPrice;
    private String nickname;

    public void copy(UserRecharge source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }

    public UserRecharge() {
    }

    public Long getId() {
        return this.id;
    }

    public Long getUid() {
        return this.uid;
    }

    public String getOrderId() {
        return this.orderId;
    }

    public BigDecimal getPrice() {
        return this.price;
    }

    public BigDecimal getGivePrice() {
        return this.givePrice;
    }

    public String getRechargeType() {
        return this.rechargeType;
    }

    public Integer getPaid() {
        return this.paid;
    }

    public Date getPayTime() {
        return this.payTime;
    }

    public BigDecimal getRefundPrice() {
        return this.refundPrice;
    }

    public String getNickname() {
        return this.nickname;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setUid(final Long uid) {
        this.uid = uid;
    }

    public void setOrderId(final String orderId) {
        this.orderId = orderId;
    }

    public void setPrice(final BigDecimal price) {
        this.price = price;
    }

    public void setGivePrice(final BigDecimal givePrice) {
        this.givePrice = givePrice;
    }

    public void setRechargeType(final String rechargeType) {
        this.rechargeType = rechargeType;
    }

    public void setPaid(final Integer paid) {
        this.paid = paid;
    }

    public void setPayTime(final Date payTime) {
        this.payTime = payTime;
    }

    public void setRefundPrice(final BigDecimal refundPrice) {
        this.refundPrice = refundPrice;
    }

    public void setNickname(final String nickname) {
        this.nickname = nickname;
    }

    public String toString() {
        return "UserRecharge(id=" + this.getId() + ", uid=" + this.getUid() + ", orderId=" + this.getOrderId() + ", price=" + this.getPrice() + ", givePrice=" + this.getGivePrice() + ", rechargeType=" + this.getRechargeType() + ", paid=" + this.getPaid() + ", payTime=" + this.getPayTime() + ", refundPrice=" + this.getRefundPrice() + ", nickname=" + this.getNickname() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof UserRecharge)) {
            return false;
        } else {
            UserRecharge other = (UserRecharge)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                Object this$id = this.getId();
                Object other$id = other.getId();
                if (this$id == null) {
                    if (other$id != null) {
                        return false;
                    }
                } else if (!this$id.equals(other$id)) {
                    return false;
                }

                Object this$uid = this.getUid();
                Object other$uid = other.getUid();
                if (this$uid == null) {
                    if (other$uid != null) {
                        return false;
                    }
                } else if (!this$uid.equals(other$uid)) {
                    return false;
                }

                label119: {
                    Object this$paid = this.getPaid();
                    Object other$paid = other.getPaid();
                    if (this$paid == null) {
                        if (other$paid == null) {
                            break label119;
                        }
                    } else if (this$paid.equals(other$paid)) {
                        break label119;
                    }

                    return false;
                }

                label112: {
                    Object this$orderId = this.getOrderId();
                    Object other$orderId = other.getOrderId();
                    if (this$orderId == null) {
                        if (other$orderId == null) {
                            break label112;
                        }
                    } else if (this$orderId.equals(other$orderId)) {
                        break label112;
                    }

                    return false;
                }

                Object this$price = this.getPrice();
                Object other$price = other.getPrice();
                if (this$price == null) {
                    if (other$price != null) {
                        return false;
                    }
                } else if (!this$price.equals(other$price)) {
                    return false;
                }

                Object this$givePrice = this.getGivePrice();
                Object other$givePrice = other.getGivePrice();
                if (this$givePrice == null) {
                    if (other$givePrice != null) {
                        return false;
                    }
                } else if (!this$givePrice.equals(other$givePrice)) {
                    return false;
                }

                label91: {
                    Object this$rechargeType = this.getRechargeType();
                    Object other$rechargeType = other.getRechargeType();
                    if (this$rechargeType == null) {
                        if (other$rechargeType == null) {
                            break label91;
                        }
                    } else if (this$rechargeType.equals(other$rechargeType)) {
                        break label91;
                    }

                    return false;
                }

                Object this$payTime = this.getPayTime();
                Object other$payTime = other.getPayTime();
                if (this$payTime == null) {
                    if (other$payTime != null) {
                        return false;
                    }
                } else if (!this$payTime.equals(other$payTime)) {
                    return false;
                }

                Object this$refundPrice = this.getRefundPrice();
                Object other$refundPrice = other.getRefundPrice();
                if (this$refundPrice == null) {
                    if (other$refundPrice != null) {
                        return false;
                    }
                } else if (!this$refundPrice.equals(other$refundPrice)) {
                    return false;
                }

                Object this$nickname = this.getNickname();
                Object other$nickname = other.getNickname();
                if (this$nickname == null) {
                    if (other$nickname != null) {
                        return false;
                    }
                } else if (!this$nickname.equals(other$nickname)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UserRecharge;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = super.hashCode();
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $uid = this.getUid();
        result = result * 59 + ($uid == null ? 43 : $uid.hashCode());
        Object $paid = this.getPaid();
        result = result * 59 + ($paid == null ? 43 : $paid.hashCode());
        Object $orderId = this.getOrderId();
        result = result * 59 + ($orderId == null ? 43 : $orderId.hashCode());
        Object $price = this.getPrice();
        result = result * 59 + ($price == null ? 43 : $price.hashCode());
        Object $givePrice = this.getGivePrice();
        result = result * 59 + ($givePrice == null ? 43 : $givePrice.hashCode());
        Object $rechargeType = this.getRechargeType();
        result = result * 59 + ($rechargeType == null ? 43 : $rechargeType.hashCode());
        Object $payTime = this.getPayTime();
        result = result * 59 + ($payTime == null ? 43 : $payTime.hashCode());
        Object $refundPrice = this.getRefundPrice();
        result = result * 59 + ($refundPrice == null ? 43 : $refundPrice.hashCode());
        Object $nickname = this.getNickname();
        result = result * 59 + ($nickname == null ? 43 : $nickname.hashCode());
        return result;
    }
}

